<?php
class ORMpz_system extends ORMBase {
  public function __construct() {
    parent::__construct('pz_system');
  }

  public function __toEpObject($myManager, $epObject, $object) {
    if (isset($object->track_id)) {
      $epObject->track_id =  $object->track_id;
    }
    if (isset($object->address)) {
      $epObject->address =  $object->address;
    }
    if (isset($object->phone)) {
      $epObject->phone =  $object->phone;
    }
    if (isset($object->fax)) {
      $epObject->fax =  $object->fax;
    }
    if (isset($object->email)) {
      $epObject->email =  $object->email;
    }
    if (isset($object->gst)) {
      $epObject->gst =  $object->gst;
    }
    return $epObject;
  }

  public function __toObject($myManager, $epObject, $object) {
    $object->id = $epObject->oid;
    $object->track_id = $epObject->track_id;
    $object->address = $epObject->address;
    $object->phone = $epObject->phone;
    $object->fax = $epObject->fax;
    $object->email = $epObject->email;
    $object->gst = $epObject->gst;
    return $object;
  }
}
?>
